from sqlalchemy import Table, Date, Column, Integer, String, ForeignKey
from sqlalchemy.orm import registry
mapper_registry = registry()
Base = mapper_registry.generate_base()



class Majors(Base):
    __tablename__ = "majors"
    m_id = Column(String(32), primary_key=True)
    m_name = Column(String(32))
    create_time = Column(Date)



    def __init__(self,m_id=None,m_name =None,create_time=None):
        self.m_id = m_id
        self.m_name = m_name
        self.create_time = create_time


    def format_str(self):
        return self.m_id+","+self.m_name+","+self.create_time